]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell-app: Track all application windows
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 4 Dec 2013 16:26:01 +0000 (17:26 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 7 Dec 2013 09:10:06 +0000 (10:10 +0100)
Filtering out "non-interesting" windows beforehand as we currently do
means that we may get properties that should be based on all windows,
like the last time the application was used, wrong.
Just track all windows and filter out non-interesting windows manually
in the one place we actually care about the difference.

https://bugzilla.gnome.org/show_bug.cgi?id=719824

js/ui/appDisplay.js
src/shell-app.c
src/shell-window-tracker.c

index ff9c14b4a900e6aa22c8316c235ab8b98dfea0fe..357fcfb6f9252a40ec8c83f93c975d5bc9b57a11 100644 (file)
@@ -1514,7 +1514,9 @@ const AppIconMenu = new Lang.Class({
     _redisplay: function() {
         this.removeAll();
 
-        let windows = this._source.app.get_windows();
+        let windows = this._source.app.get_windows().filter(function(w) {
+            return Shell.WindowTracker.is_window_interesting(w);
+        });
 
         // Display the app windows menu items and the separator between windows
         // of the current desktop and other windows.
index 63f9bc76fe34bc7316575932f81b1617c72b09e2..e2745d3817909cdc1a80186ede6d3667620b9648 100644 (file)
@@ -730,10 +730,10 @@ shell_app_compare_windows (gconstpointer   a,
  * shell_app_get_windows:
  * @app:
  *
- * Get the toplevel, interesting windows which are associated with this
- * application.  The returned list will be sorted first by whether
- * they're on the active workspace, then by whether they're visible,
- * and finally by the time the user last interacted with them.
+ * Get the windows which are associated with this application. The
+ * returned list will be sorted first by whether they're on the
+ * active workspace, then by whether they're visible, and finally
+ * by the time the user last interacted with them.
  *
  * Returns: (transfer none) (element-type MetaWindow): List of windows
  */
index e1d563f3cdc2c53252cad2e98d7e9b543b1818ad..4bccf6e943140a3eb6198fd10c5cdfa525d061cf 100644 (file)
@@ -489,9 +489,6 @@ track_window (ShellWindowTracker *self,
 {
   ShellApp *app;
 
-  if (!shell_window_tracker_is_window_interesting (window))
-    return;
-
   app = get_app_for_window (self, window);
   if (!app)
     return;
@@ -530,11 +527,8 @@ disassociate_window (ShellWindowTracker   *self,
 
   g_hash_table_remove (self->window_to_app, window);
 
-  if (shell_window_tracker_is_window_interesting (window))
-    {
-      _shell_app_remove_window (app, window);
-      g_signal_handlers_disconnect_by_func (window, G_CALLBACK(on_wm_class_changed), self);
-    }
+  _shell_app_remove_window (app, window);
+  g_signal_handlers_disconnect_by_func (window, G_CALLBACK(on_wm_class_changed), self);
 
   g_signal_emit (self, signals[TRACKED_WINDOWS_CHANGED], 0);